<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
  
  
  <script type="text/javascript">
  
  $(document).ready(function(){
  /*
  var line1=[[20140105001, 1], [20140105002, 2], [20140105003, 3], [20140105004, 4],
      [20140105005, 5], [20140105006, 6], [20140105007, 7], [20140105008, 6],
      [20140105009, 2], [20140105010, 3], [20140105011, 4], [20140105012, 5]];
  var plot1 = $.jqplot('chart1', [line1], {
      title:'Data Point Highlighting',
      axes:{
        xaxis:{
          renderer:$.jqplot.BarAxisRenderer,
          tickOptions:{
            formatString:'%#d'
          } 
        },
        yaxis:{
          tickOptions:{
            formatString:'%.1f'
            }
        }
      },
      highlighter: {
        show: true,
        sizeAdjust: 7.5
      },
      cursor: {
        show: false
      }
  });
  */
  
  
  var JSONArray = {};
  JSONArray.parse = function(json){
  		return (new Function("return "+json))();
  }
  $.get('rest/RmAppShishicaiService/getrmappshishicailist',{},function(v){
  		var items = JSONArray.parse(v)['items'];
  		var ck1 = "";
  		var ck2 = "";
  		var ck3 = "";
  		var ck4 = "";
  		var ck5 = "";
  		for(var i = 0;i<items.length;i++){
  			
  			
  			ck1 += items[i]['a']+",";
  			ck2 += items[i]['b']+",";
  			ck3 += items[i]['c']+",";
  			ck4 += items[i]['d']+",";
  			ck5 += items[i]['e']+",";
  			
  			
  		}
  		
  		
  		ck1='['+ck1.substr(0,ck1.length-1)+']';
  		ck2='['+ck2.substr(0,ck2.length-1)+']';
  		ck3='['+ck3.substr(0,ck3.length-1)+']';
  		ck4='['+ck4.substr(0,ck4.length-1)+']';
  		ck5='['+ck5.substr(0,ck5.length-1)+']';
  		
  		
  			 var plot1 = $.jqplot ('chart1', [JSONArray.parse(ck1),JSONArray.parse(ck2),JSONArray.parse(ck3),JSONArray.parse(ck4),JSONArray.parse(ck5)],{
   	  			title: 'Plot With Options',
      				axesDefaults: {
        			labelRenderer: $.jqplot.CanvasAxisLabelRenderer
      			},
      			axes: {
        			xaxis: {
          			pad: 0
        			},
        			yaxis: {
         			pad: 0
        			}
      			},
  				highlighter: {
       				show: true
  				}
 			});
  
  
  })
  
 
});
  
  </script>
  
  </head>
  
  <body>
    <div id="chart1" style="width: 100%;" ></div>
  </body>
</html>
